﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="PR_BudgetManageSummary.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_BudgetManageSummary" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc4" %> 

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  

    <script type="text/javascript">   

          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
//                 alert("กรอกได้แต่ตัวเลขครับ!")
                 return false;
	          }
             return true;
          }
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
          } 
                    
            function openProjectDetails(id) 
                {               
                   radopen("PR_BudgetManagementTestDtl.aspx?mng_test_seq=" + id, "ProjectDtls");
                   
                    return false;
                }
             function Addnew() {
                 return false;
             }

             
</script>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="แบบทดสอบการบริหารวงเงิน"
        width="1000px"
        Height="650px"        
        Modal="true"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


</telerik:RadWindowManager>
    
    <title>สรุปแบบทดสอบวงเงินการเลื่อนเงินเดือน</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280" valign = "top">
                <!-- <uc4:user ID="user1" runat="server" /> -->
            </td>            
            <td width="20" ></td>            
            <td>
            
            <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
                         <asp:Panel ID="PanelFilter" runat="server" Width="700px" ScrollBars="Auto">
                            <table align = "center" width = "690px">
                                <tr>
                                <td align = "right">ประเภทบุคลากร : </td>
                                <td>
                                  <telerik:RadComboBox ID="cmbEmployeeType" runat="server" 
                                        AutoPostBack="True" 
                                      CausesValidation="false" 
                                      DataTextField="Name" DataValueField="Sequence" 
                                      EmptyMessage="... ประเภทบุคลากร..." Filter="Contains" 
                                      OnClientTextChange="onTextChange" 
                                      onselectedindexchanged="cmbEmployeeType_SelectedIndexChanged" Width="150px">
                                  </telerik:RadComboBox>
                              </td>
                                    <td align="right" >
                                        การเลื่อนเงินเดือนประจำปี :
                                    </td>
                                    <td align="left">                                        
                                        <telerik:RadComboBox ID="cbYear" runat="server" AllowCustomText="true" 
                                            AutoPostBack="True" CausesValidation="false" DataTextField="Name" 
                                            DataValueField="Name" EmptyMessage="...เลือกปี ..." Filter="Contains" 
                                            OnClientTextChange="onTextChange" 
                                            onselectedindexchanged="cbYear_SelectedIndexChanged" Width="80px">
                                        </telerik:RadComboBox>
                                    </td>
                                    
                                   <td>
                                        <asp:RadioButtonList ID="radPromotion" runat="server" 
                                            RepeatDirection="Horizontal" AutoPostBack="True" 
                                            onselectedindexchanged="radPromotion_SelectedIndexChanged">
                                            <asp:ListItem Value="1" Selected = "True">ครั้งที่ 1</asp:ListItem>
                                            <asp:ListItem Value="2">ครั้งที่ 2</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </div>           
            
            </td>
            
          </tr>
          </table>
          
        <div class="moduleDivSlim1000x450">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
                แบบทดสอบวงเงินการเลื่อนเงินเดือน</td>
        </tr>
        </table>
        <table align="center" width ="980px" >
        <tr>
        <td >
        <asp:Panel ID="PanelGrid" 
            runat="server" 
            Width="970px" 
            Height="350px" ScrollBars="Auto" >
            <telerik:RadGrid ID="RadGrid2" runat="server" 
                    AllowFilteringByColumn="True" 
                    AllowMultiRowSelection="True" 
                    AllowPaging="false"
                    AllowSorting="True" 
                    AutoGenerateColumns="False" 
                    EnableAJAX="True" 
                    GridLines="None" 
                    OnItemCommand="RadGrid2_ItemCommand" 
                    Skin="Outlook" 
                    Width="950px" >                                       
                    <MasterTableView AllowMultiColumnSorting="True" 
                        ClientDataKeyNames="mng_test_seq" 
                        DataKeyNames="mng_test_seq" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                    <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                        
                        <Columns>                        
                        
                        <telerik:GridBoundColumn DataField="job_site_name" 
                            HeaderText="สำนัก/กอง" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            UniqueName="job_site_name">
                            <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn 
                                AutoPostBackOnFilter="true" 
                                ShowFilterIcon="false" 
                                CurrentFilterFunction="Contains" 
                                DataField="mng_test_name" 
                                FilterControlWidth="100%" 
                                HeaderStyle-HorizontalAlign="Center" HeaderText="ชื่อแบบทดสอบ" >              
                
                                <ItemTemplate>              
                                    <asp:LinkButton ID="targetControl" runat="server" Text='<%# Eval("mng_test_name") %>' OnClientClick='<%# string.Format("return openProjectDetails(\"{0}\");", Eval("mng_test_seq")) %>' 
                                        ></asp:LinkButton>
                                </ItemTemplate>               

                            <HeaderStyle HorizontalAlign="Center" />
                            </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="amount_net" 
                            HeaderText="งบประมาณ" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            UniqueName="amount_net"
                            DataFormatString="{0:#,##0.00}">
                            <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign = "Right" />
                            </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            DataField="sum_amount" 
                            HeaderText="จำนวนเงินที่เลื่อน" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            UniqueName="sum_amount"
                            DataFormatString="{0:#,##0.00}">
                            <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign = "Right" />
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn 
                            DataField="total" 
                            HeaderText="งบประมาณขาด/เกิน" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            UniqueName="total"
                            DataFormatString="{0:#,##0.00}">
                            <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign = "Right" />
                        </telerik:GridBoundColumn>                                
                 </Columns>
                 
                 <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                 </MasterTableView>
                 
                 <ClientSettings EnableRowHoverStyle="true" >
                    <Selecting AllowRowSelect="True" />
                    <Selecting AllowRowSelect="True"  />
                </ClientSettings>
            </telerik:RadGrid>
        </asp:Panel>
        </td>
        </tr>
        </table>
        </div>
</div>
</td>
</tr>
</table>
</asp:panel>

</asp:Content>